<template>
  <div class="content-section">
      <DataTotal :total="total" :types="types" :name="'abroad'" @showmore="showMoreData"></DataTotal>
      <DataTable :data="data" :title="'海外国家'"></DataTable>
  </div>
</template>

<script>
import DataTable from '../componets/dataTable';
import DataTotal from '../componets/dataTotal';
export default {
    components:{
        DataTable,
        DataTotal
    },
    props:['total','data'],
    data(){
        return{
            types:['confirm','nowConfirm','heal','dead']
        }
    },
    methods:{
        showMoreData(name){
            const addItem = name === 'abroad' ? ['imported','suspect'] : ['dead','suspect']
            this.types =this.types.concat(addItem);
        }
    }
}
</script>

<style>

</style>